package com.tlgen.orm.domain;

import com.tlgen.orm.annotation.Association;
import com.tlgen.orm.annotation.Collection;
import com.tlgen.orm.common.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SysUser extends BaseEntity {

    private String username;

    private String mobile;

    private String email;

    private Integer gender;

    @Association(relate = "dept_id")
    private SysDept dept;

    @Collection(middle = SysUserRole.class)
    private List<SysRole> roleList;

}
